import { createRouter, createWebHistory } from 'vue-router';

const router = createRouter({
	history: createWebHistory(),
	routes: [
		{
			path: '/',
			redirect: '/home',
		},
		{
			name: 'home',
			path: '/home',
			component: () => import('@/views/Home/index.vue'),
		},
		{
			name: 'hospital',
			path: '/hospital',
			component: () => import('@/views/Hospital/index.vue'),
		},
	],
	// 滚动行为
	scrollBehavior() {
		return {
			top: 0,
			left: 0,
		};
	},
});

export default router;
